from utils import send_msg

def start_test_msg(ssh, report):
    report = test_busctl_maca(ssh, report)
    report = test_busctl_ipmcget(ssh, report)
    return report

def test_busctl_maca(ssh, report):
    command_msg = "busctl --user tree bmc.kepler.maca"
    end_flag = "/kepler"
    output, endtime = send_msg(ssh, command_msg, end_flag)
    print("{} after {} s response".format(command_msg, endtime))
    report[command_msg] = endtime
    return report

def test_busctl_ipmcget(ssh, report):
    command_msg = "ipmcget -d v"
    end_flag = "iBMC INFO"
    output, endtime = send_msg(ssh, command_msg, end_flag)
    print("{} after {} s response".format(command_msg, endtime))
    report[command_msg] = endtime
    return report

